package avicit.bdp.dds.api.service;

import avicit.bdp.common.base.BaseService;
import avicit.bdp.dds.dao.entity.Command;
import avicit.bdp.dds.dao.mapper.CommandMapper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @金航数码科技有限责任公司
 * @作者：developer
 * @邮箱：developer@avic-digital.com
 * @创建时间： 2020-06-24 14:54
 * @类说明：CommandService
 * @修改记录：
 */
@Service
public class CommandService extends BaseService<CommandMapper, Command> {

    private static final Logger LOGGER = LoggerFactory.getLogger(CommandService.class);
    /**
     * find one command from queue list
     * @return command
     */
    public Command findOneCommand(){
        return this.mapper.getOneToRun();
    }
    
    public List<Command> findCommandList(){
    	return this.mapper.selectAll();
    }
  
}